Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 13 - AppleTalk Data Stream Protocol (ADSP)


About ADSP

The AppleTalk Data Stream Protocol (ADSP) includes both session and transport services and is the most commonly used of the AppleTalk transport protocols. ADSP allows you to establish and maintain a connection between two AppleTalk network entities and transfer data as a continuous stream. The two clients at either end of an ADSP connection are equal and can perform the same operations.

ADSP, like all other high-level AppleTalk protocols, is a client of the Datagram Delivery Protocol (DDP), which transmits data in packets. However, ADSP builds a session connection on top of DDP's packet transfer services, so you can exchange data as a continuous stream. This allows ADSP's client applications to retain many of the advantages of a transaction-based protocol while providing a full-duplex data stream. Figure 13-1 shows how the ADSP endpoint provider encompasses its underlying delivery protocol and link-access Streams modules.

Figure 13-1 The ADSP endpoint provider's underlying delivery mechanism

Communication between two client applications using ADSP occurs over a connection between two endpoints that provides reliable data delivery. When you bind an ADSP endpoint, the binding process associates a local protocol address with your endpoint. In ADSP, this identifies the socket address, and ADSP uses this as part of the address for sending and receiving packets of data. Each socket can maintain concurrent ADSP connections with several other sockets, but there can be only one ADSP connection between any two sockets at one time.

ADSP uses several internally maintained variables to track its progress as it transmits a data stream across a connection. For example, ADSP associates an internal sequence number with each byte that it sends. This allows ADSP to determine out-of-sequence or duplicate data. ADSP uses the sequence numbers to ensure that the other endpoint receives all of its intended data. If any data does not arrive, ADSP can retransmit it.

The data is available for retransmission because when an endpoint provider sends data to a remote connection end, ADSP first stores it in a buffer, called the send queue, and holds the data there until the remote connection end acknowledges receipt. Likewise, when data arrives from a remote endpoint, ADSP stores it in a receiving buffer, called the receive queue, until the local endpoint provider acknowledges reading it.

ADSP does not transmit data from the remote connection end until there is space available in the local receive queue. This built-in flow control keeps a connection from being jammed with too much data.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996